package com.sky.controller.user;

import com.sky.dto.UserLoginDTO;
import com.sky.result.Result;
import com.sky.service.UserService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther: zhaoss
 * @Date: 2023/5/3 - 05 - 03 - 21:06
 * @Description: com.sky.controller.admin
 * @version: 1.0
 */
@RestController
@RequestMapping("/user/user")
@Api(tags = "C端用户相关接口")
public class UserController {
    @Autowired
    private UserService userService;

    /**
     * 微信登录
     * @param dto
     * @return
     */
    @PostMapping("/login")
    public Result login(@RequestBody UserLoginDTO dto){
        return userService.login(dto);
    }

}
